package android.javaClasses;

import android.content.Context;
import android.widget.TableRow;
import android.widget.TableLayout;
import android.widget.TextView;


/**
 * Created by IntelliJ IDEA.
 * User: michelle
 * Date: 4/11/11
 * Time: 3:00 PM
 * To change this template use File | Settings | File Templates.
 */
public class XmlHandler {
    private Context c;
    private TableLayout table;

    public XmlHandler(Context c, TableLayout table) {
        this.c = c;
        this.table = table;
    }



    /**Adds two columns of text to a table */

	public void addTextToRow(String pl, String win) {
        TableRow row = new TableRow(c);
		TextView tvPl = new TextView(c);
        TextView tvWin = new TextView(c);

		tvPl.setText(pl);
        row.addView(tvPl);

        tvWin.setText(win);
        row.addView(tvWin);

        table.addView(row);
	}

}
